package ben.samplegame.rules;

import ben.samplegame.sprite.SampleLevel;
import game.engine.GameRule;
import game.sprite.PlayerSprite;

public class DeathRule implements GameRule {
    private PlayerSprite myPlayer;
    private SampleLevel myLevel;
    
    public DeathRule(PlayerSprite player, SampleLevel level){
        myPlayer = player;
        myLevel = level;
    }

    @Override
    public void checkRules () {
       if(!myPlayer.getIsActive()){
           myLevel.setLost(true);
       }
        
    }

}
